<!doctype html>
<meta charset="utf-8">
<title>Reference: middle alignment in tables</title>
<style>
td {
  height: 5em;
  width: 5em;
  border: 1px solid black;
  vertical-align: top;
}
div {
  width: 5em;
  height: 5em;
  line-height: 5em;
  vertical-align: middle;
}
</style>
<table>
  <tr>
    <td><div>Foo</div></td>
  </tr>
</table>

